<div class="col-md-12 col-sm-12 col-xs-12" v-cloak id="indexController">
    <div class="x_panel">
        <div class="x_title">
            <h2 style="width:300px;">
                积分列表
                <small></small>
            </h2>
            <ul class="nav navbar-right panel_toolbox">
                <li>
                    <a v-on:click="showAddPage()">
                        <i class="fa fa-plus">

                        </i>
                    </a>
                </li>
                <li>
                    <a v-on:click="init()">
                        <i class="fa fa-refresh">

                        </i>
                    </a>
                </li>
            </ul>
            <div class="clearfix"></div>
        </div>
        <div class="x_content">
            <table class="table table-striped table-bordered" >
                <thead>
                    <tr>
                        <th>编号</th>
                        <th>称号</th>
                        <th>比例</th>
                        <th>是否有效</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr v-for="(item,index) in list">
                        <td>{{((pager.pageIndex-1)*pager.pageSize)+index+1}}</td>
                        <td v-html="item.name"></td>
                        <td>{{item.proportion}}%
                        </td>
                        <td>
                            <span v-if="item.valid">是</span>
                            <span v-if="!item.valid">否</span>
                        </td>
                        <td>
                            <button class="btn btn-primary" type="button" v-on:click='detailDesignations(item)'>详情</button>
                            <button class="btn btn-primary" type="button" v-on:click='editDesignations(item)'>编辑</button>
                            <button class="btn btn-danger" type="button" v-on:click='deleteDesignations(item)'>删除</button>
                            <button class="btn btn-primary" type="button" v-if="!item.valid" v-on:click="setValid(item)">设置有效</button>
                            <button class="btn btn-danger" type="button" v-if="item.valid" v-on:click="setValid(item)">设置无效</button>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <page v-on:pagechange="pageChange" v-bind:pager="pager" ref="pager"></page>
    </div>
</div>
<script page-script="./dist/js/DesignationsPage/indexPage.js">
</script>